import request from '../utils/request.js'

export const Search = (data) => {
    return request.get('/homework/getallhomework', {params: data})
}
export const GetClassList = (data) => {
    return request.get('/class/getclasslist', {params: data})
}
export const UpdateHomework = (formData) => {
    return request.put('/homework/updatehomework', formData, {
        headers: {
            'Content-Type': 'multipart/form-data', // 设置请求头
        },
    });
}
export const AddHomework = (data) => {
    return request.post('/homework/addhomework', data)
}

export const UpdateSubmission= (data) => {
    return request.put('/submission/updatesubmission', data)
}

export const SearchStudent = (data) => {
    return request.get('/homework/getallhomeworkstudent', {params: data})
}
export const AddSubmission = (data) => {
    return request.post('/submission/addsubmission', data)
}
